<?php
//debug($prpData);
//$groupFileds
if($prpData){
?>
<style type="text/css">
    table#list-table-data tbody td {
        border-bottom: 1px solid #DDD;
    }
    a{
        text-decoration: none;
    }
</style>
 <div id="" class="list-table" style="border: 1px solid #B2B2B2; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;">
          <table id="list-table-data" width="100%" class="scrolltable" border="0" align="center">
            <thead style="background-color: #1C1C1C; font-size: 12px; font-family: Verdana,Arial,sans-serif; color: white;">
                <th width="2%">No.</th>
                <th width="25%">Registration Id</th>
                <th width="35%">Property Name</th>
                <th width="25%">Owner</th>
            <?php 
             if (in_array("permit_no", $groupFileds)) {
             ?>
                <th>Permit No.</th>
            <?php        
             }
            ?>
            </thead>
             <tbody>
              <?php $x = 1; 
                    foreach($prpData as $prp){
                      
                     ?>
                        <tr>
                            <td align="left">
                                <?php echo $x.'.'; ?>
                            </td>
                            <td align="left">
                                <?php echo $prp['PropertyItem']['property_reg_no']; ?>
                            </td>
                            <td align="left">
                                <?php
                                    if($prp['PropertyItem']['name']){
                                      $prt = $prp['PropertyItem']['name'];
                                    }
                                    else{
                                      $prt = '&nbsp;';
                                    }
                                    echo $prt; 
                                ?>
                            </td>
                            <td align="left">
                                <?php 
                                     if($prp['PropertyItem']['owners_name']){
                                        $prt = $prp['PropertyItem']['owners_name'];
                                     }
                                     else{
                                       $prt = '&nbsp;';
                                     }
                                     echo $prt; 
                                ?>
                            </td>
                     <?php 
                     if (in_array("permit_no", $groupFileds)) {
                     ?>
                            <td align="left">
                                 <?php  
                                  if($prp['PropertyItemDetail']['permit_no']){
                                     $prt = $prp['PropertyItemDetail']['permit_no'];
                                  }
                                  else{
                                    $prt = '&nbsp;';
                                  }
                                  echo $prt; 
                                 ?>
                            </td>
                    <?php        
                     }
                    ?>    
                        </tr>
                     <?php 
                     $x++;
                   }
              ?>
            </tbody> 
          </table>
 </div>
<?php    
}
else{
    echo "No Report At the Moment.";
}

?>